<?php
  class admin{
    private $template;
    private $util;
    
    
    public function __construct(){
        require_once(DESIGN_PATH_CODE. '/util.class.php');   
        $this->util = new util();
    } 
    public function autorun(){
        //load module
        $mid = isset($_GET['module'])?$_GET['module']:'gallery';
        switch($mid){
           case 'song':  
           case 'album':
           case 'artist':
           case 'singer':
           case 'lyric':
           case 'genre':                            
           case 'playlist':
           case 'gallery':
           case 'user':
           case 'user_role':       
           break;
           default:
                $mid = 'gallery';
                break;
           }  
        require_once("module\\{$mid}.class.php"); 
        $module = 'admin_module_'.$mid;
        $module_obj = new $module;
        $module_obj->autorun();
    }  
}
?>
